{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": [],
      "authorship_tag": "ABX9TyMyQp+SfWMutstioK6PGfBW",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/LC1332/personality-text-generation/blob/main/lulu_exp/%E5%BF%83%E7%90%86%E9%97%AE%E7%AD%94%E8%AE%BE%E8%AE%A1.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "将5个factors的划开进行统计"
      ],
      "metadata": {
        "id": "Ii-iA2a2-rVD"
      }
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "v4EtS4qw-mjR",
        "outputId": "fa47c262-71fb-4367-c725-372abf171ce0"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "60\n"
          ]
        }
      ],
      "source": [
        "questions = \"\"\"1. 我不是一个充满烦恼的人。\n",
        "2. 我真的喜欢大部份我遇见的人。\n",
        "3. 我不喜欢浪费时间去做白日梦。\n",
        "4. 我会怀疑及讽刺别人的企图。\n",
        "5. 在工作上，我是有效率又能胜任的。\n",
        "6. 我很少感到恐惧及焦虑。\n",
        "7. 我很喜欢与别人交谈。\n",
        "8. 大自然和艺术的规律形态使我感到极为奥妙。\n",
        "9. 我相信如果你允许别人占你的便宜，很多人都会这样做。\n",
        "10. 我会保持我的物件整齐和清洁。\n",
        "11. 我经常感到紧张及心神不定。\n",
        "12. 我喜欢很多人在我周围。\n",
        "13. 我对诗词只有少许感觉甚至无动於衷。\n",
        "14. 如果需要，我会去操纵别人而达到我所想要的。\n",
        "15. 我不是一个做事有条不紊的人。\n",
        "16. 别人对待我的方式常使我感到愤怒。\n",
        "17. 当我阅读一首诗或欣赏一件艺术品时，我有时会感 到兴奋或惊喜。\n",
        "18. 我一向喜欢单独工作。\n",
        "19. 有些人觉得我自私又自我中心。\n",
        "20. 我好像总是不能把事情安排得井井有条。\n",
        "21. 我很少感到寂寞或忧郁。\n",
        "22. 我宁愿我行我素也不愿成为别人的领袖。\n",
        "23. 我很少注意自己在不同环境下的情绪或感觉。\n",
        "24. 有些人觉得我冷漠又爱算计。\n",
        "25. 我会尽心尽力完成一切分派给我的工作。\n",
        "26. 有时我感到自已完全一文不值。\n",
        "27. 我常常感到精力旺盛。\n",
        "28. 当我找到了做事情的正确方法后，我会坚持采用这个方法。\n",
        "29. 我通常会尽力体贴及顾虑周到。\n",
        "30. 我有时不能做到我应有的可靠或可信。\n",
        "31. 我很少感到忧郁或沮丧。\n",
        "32. 我生活的节奏很快。\n",
        "33. 我经常会去尝试新的及外国的食物。\n",
        "34. 大部份认识我的人都喜欢我。\n",
        "35. 当我做了承诺，通常我能贯彻到底。\n",
        "36. 很多时候，当事情不对劲时，我会感到挫败及想放弃。\n",
        "37. 我是一个十分活跃的人。\n",
        "38. 我喜欢思考及把玩理论或抽象的观念。\n",
        "39. 我宁愿与人合作，而不愿与人竞争。\n",
        "40. 我有一套明确的目标，并能有条不紊地朝著它而工作。\n",
        "41. 有时我会羞愧得想躲起来。\n",
        "42. 我喜欢身历其境，置身於事件之中。\n",
        "43. 我没有兴趣思索宇宙的规律或人类的情况。\n",
        "44. 如果我不喜欢某一个人，我会让他知道。\n",
        "45. 我努力完成我的目标。\n",
        "46. 我经常感到自己不如别人。\n",
        "47. 我并不是一个乐观主义者。\n",
        "48. 我对思考性的事物充满好奇。\n",
        "49. 我时常和家人及同事起争执。\n",
        "50. 我凡事必追求卓越。\n",
        "51. 我经常感到无助，并希望有人能解决我的问题。\n",
        "52. 我是一个快乐、高兴的人。\n",
        "53. 我相信让学生听富争论性的演讲只会混淆及误导他们的思想。\n",
        "54. 我对自已有很高的评价。\n",
        "55. 我颇能按造自已的步伐，把事情准时办妥。\n",
        "56. 当我处于极大压力下，有时候我会感到好像精神崩 溃似的。\n",
        "57. 我很容易笑。\n",
        "58. 我认为在道德问题上做决定时，我们应遵从宗教权威。\n",
        "59. 在态度上，我是顽固不妥协的。\n",
        "60. 我要花很多时间才能安顿下来工作。\"\"\"\n",
        "\n",
        "questions = questions.split('\\n')\n",
        "print(len(questions))"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "为我提取文字中的题号，输出为python数组格式。\n",
        "\n",
        "输入:\n",
        "神经质：题项有：1 6 11 16 21 26 31 36 41 46 51 56   其中：1 6  21 31题为反向记分   得分越低，表示情绪越稳定；得分越高，表示情绪越不稳定。对283名大学生使用此量表的测试结果表明，20.4分以下为典型低分，38.8分以上为典型高分。\n",
        "\n",
        "输出:\n",
        "id_neuroticism = [1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56]\n",
        "id_neuroticism_neg = [1, 6, 21, 31]\n",
        "\n",
        "输入：\n",
        "外倾性(extraversion)：题项有：2  7  12 18 22 27 32 37 42 47 52 57   其中：18 22 47题为反向记分   得分越高，性格越外向。对283名大学生使用此量表的测试结果表明，26分以下为典型低分，42分以上为典型高分\n",
        "开放性(openness)：题项有：3  8  13 17 23 28 33 38 43 48 53 58  其中：3 13 28 43 53 58题为反向记分  得分越高，性格越开朗，态度开放，容易接受新事物。对283名大学生使用此量表的测试结果表明，32分以下为典型低分，47分以上为典型高分。\n",
        "友善性(agreeableness)：题项有：4 9  14 19 24 29 34 39 44 49 54 59    其中：4 9  14 19 24 44 49 54题为反向记分   得分越高，性格越随和。对283名大学生使用此量表的测试结果表明，30分以下为典型低分，48分以上为典型高分。\n",
        "严谨性(conscientiousness)：题项为：5 10 15 20 25 30 35 40 45 50 55 60     其中: 20 30 60题为反向记分   得分越高，责任心越强。对283名大学生使用此量表的测试结果表明，36分以下为典型低分，44分以上为典型高分。\n"
      ],
      "metadata": {
        "id": "a6yT4Vt2_HnA"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "big5_to_prob_id = {\n",
        "    'neuroticism': [1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56],\n",
        "    'extraversion': [2, 7, 12, 18, 22, 27, 32, 37, 42, 47, 52, 57],\n",
        "    'openness': [3, 8, 13, 17, 23, 28, 33, 38, 43, 48, 53, 58],\n",
        "    'agreeableness': [4, 9, 14, 19, 24, 29, 34, 39, 44, 49, 54, 59],\n",
        "    'conscientiousness': [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60]\n",
        "}\n",
        "\n",
        "big5_to_neg_id = {\n",
        "    'neuroticism': [1, 6, 21, 31],\n",
        "    'extraversion': [18, 22, 47],\n",
        "    'openness': [3, 13, 28, 43, 53, 58],\n",
        "    'agreeableness': [4, 9, 14, 19, 24, 44, 49, 54],\n",
        "    'conscientiousness': [20, 30, 60]\n",
        "}"
      ],
      "metadata": {
        "id": "CIj5YubG-4t4"
      },
      "execution_count": 5,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "这些太难记了，我们建立一个字典long_name来记录完整的单词"
      ],
      "metadata": {
        "id": "IQ2uQw25U3u3"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "long_name = {\n",
        "    'N':'neuroticism',\n",
        "    'E':'extraversion',\n",
        "    'O':'openness',\n",
        "    'A':'agreeableness',\n",
        "    'C':'conscientiousness'\n",
        "}"
      ],
      "metadata": {
        "id": "CkZwXAySU9wY"
      },
      "execution_count": 27,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "import json\n",
        "\n",
        "save_name = '/content/questions.jsonl'\n",
        "\n",
        "datas = []\n",
        "\n",
        "with open(save_name, 'w', encoding='utf-8') as f:\n",
        "\n",
        "    for i in range(len(questions)):\n",
        "        question = questions[i]\n",
        "        sep = question.find(\".\",1)\n",
        "        question = question[sep+2:]\n",
        "\n",
        "        for factor in big5_to_prob_id.keys():\n",
        "            if i+1 in big5_to_prob_id[factor]:\n",
        "                factor_name = factor\n",
        "                if i+1 in big5_to_neg_id[factor]:\n",
        "                    if_pos = False\n",
        "                else:\n",
        "                    if_pos = True\n",
        "\n",
        "                data = {\n",
        "                    'id': i,\n",
        "                    'question': question,\n",
        "                    'factor': factor_name,\n",
        "                    'if_pos': if_pos\n",
        "                }\n",
        "\n",
        "                datas.append(data)\n",
        "\n",
        "                json.dump(data, f, ensure_ascii=False)\n",
        "                f.write('\\n')"
      ],
      "metadata": {
        "id": "tl7buJbj-8Sr"
      },
      "execution_count": 17,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "```py\n",
        "for i in range(len(questions)):\n",
        "    question = questions[i]\n",
        "    sep = question.find(\".\",1)\n",
        "    question = question[sep+1:]\n",
        "    for factor in big5_to_prob_id.keys():\n",
        "        if i+1 in big5_to_prob_id[factor]:\n",
        "            factor_name = factor\n",
        "            if i+1 in big5_to_neg_id[factor]:\n",
        "                if_pos = False\n",
        "            else:\n",
        "                if_pos = True\n",
        "```\n",
        "\n",
        "进一步修改这个程序，把i, question, factor_name, if_pos 存储到一个jsonl文件中，并且保存到save_name = '/content/questions.jsonl' 中"
      ],
      "metadata": {
        "id": "TfFSxlRjBoEJ"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "# 对单个factor，修改为开放性问题"
      ],
      "metadata": {
        "id": "tw1iYAuFCY4V"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "current_factor = 'openness'\n",
        "\n",
        "problems = [x for x in datas if x['factor'] == current_factor]\n",
        "\n",
        "print(len(problems))\n",
        "\n",
        "for prob in problems:\n",
        "    print(prob['question'])"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "ls6DwLp4BDrd",
        "outputId": "461b739e-9b48-4693-eb65-0753f8d63034"
      },
      "execution_count": 20,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "12\n",
            "我不喜欢浪费时间去做白日梦。 \n",
            "大自然和艺术的规律形态使我感到极为奥妙。 \n",
            "我对诗词只有少许感觉甚至无动於衷。 \n",
            "当我阅读一首诗或欣赏一件艺术品时，我有时会感 到兴奋或惊喜。 \n",
            "我很少注意自己在不同环境下的情绪或感觉。 \n",
            "当我找到了做事情的正确方法后，我会坚持采用这个方法。  \n",
            "我经常会去尝试新的及外国的食物。 \n",
            "我喜欢思考及把玩理论或抽象的观念。 \n",
            "我没有兴趣思索宇宙的规律或人类的情况。 \n",
            "我对思考性的事物充满好奇。 \n",
            "我相信让学生听富争论性的演讲只会混淆及误导他们的思想。\n",
            "我认为在道德问题上做决定时，我们应遵从宗教权威。\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "claude_output = \"\"\"大自然和艺术中的规律性和形式感让我感到非常震撼和惊喜。你也有类似的体验吗?比如欣赏一件艺术品或者读诗时,会不会感到特别的兴奋或惊喜呢?\n",
        "\n",
        "在不同的环境和情绪下,我其实很少会注意到自己内心的感受或体验。你在生活中会关注自己的情绪变化吗?\n",
        "\n",
        "我自己平时不大关注诗词,你平时会阅读或欣赏诗歌或者其他艺术品吗?\n",
        "\n",
        "我确定了一种做事的方法后就会坚持下去,你在生活或工作中也是这样吗?还是更喜欢尝试不同的新方法?\n",
        "\n",
        "我经常会尝试新鲜且外国的食物。你平时也喜欢体验新的东西吗?像是尝试外国餐厅或是学一门新技能之类的。\n",
        "\n",
        "我喜欢思考理论或抽象的概念,这对我来说很有意思。你也喜欢思考一些抽象的概念吗?\n",
        "\n",
        "我对宇宙的奥秘以及人类的处境不太感兴趣。你对这些问题怎么看呢?\n",
        "\n",
        "我对一切新的事物都很好奇。你也经常会对新事物充满好奇吗?\n",
        "\n",
        "我认为在学校里让学生听辩论性的演讲只会让他们迷惑。你对学生接受不同观点有什么看法呢?\n",
        "\n",
        "在道德或伦理问题上,我认为我们应该遵循宗教权威。你在面对伦理道德问题时,通常是自己判断还是倾向于听从权威意见呢?\"\"\""
      ],
      "metadata": {
        "id": "s6Kg31fwChK1"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "让我们来重构一下"
      ],
      "metadata": {
        "id": "B8O0hhSWKXDH"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "preffix_prompt = \"\"\"你扮演一个资深的心理学家\n",
        "\n",
        "我正在设计一个心理学的实验，我希望将closed-form的心理测试问卷问题改为更开放型的问题。\n",
        "\"\"\"\n",
        "\n",
        "suffix_prompt = \"\"\"我希望将closed-form的心理测试问卷问题改为更开放型的问题，更适合我在面对面访谈中对被试进行问询。使用更口语化的方式进行提问，或者可以先提到一个自己的例子，然后再对被试进行提问，拉近与被试之间的距离。使用 - <转换后问题> 的形式输出\n",
        "\n",
        "例子输入:\n",
        "- 我经常会去尝试学习新的技能或知识。\n",
        "例子输出:\n",
        "- 我最近去体验了钢琴课。你最近有没有学一些新的技能呢？\n",
        "\n",
        "例子输入:\n",
        "- 我不喜欢浪费时间去做白日梦。\n",
        "- 我对诗词只有少许感觉甚至无动於衷。\n",
        "例子输出:\n",
        "- 你有没有觉得自己有时候有一些奇思妙想差一步就能够实现呢？\n",
        "- 我自己平时不大关注诗词,你平时会阅读或欣赏诗歌或者其他艺术品吗?\n",
        "\"\"\""
      ],
      "metadata": {
        "id": "kLMgevz-KYNz"
      },
      "execution_count": 31,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "#@title 大五人格的分factor细节定义\n",
        "\n",
        "# big5_to_prob_id = {\n",
        "#     'neuroticism': [1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56],\n",
        "#     'extraversion': [2, 7, 12, 18, 22, 27, 32, 37, 42, 47, 52, 57],\n",
        "#     'openness': [3, 8, 13, 17, 23, 28, 33, 38, 43, 48, 53, 58],\n",
        "#     'agreeableness': [4, 9, 14, 19, 24, 29, 34, 39, 44, 49, 54, 59],\n",
        "#     'conscientiousness': [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60]\n",
        "# }\n",
        "\n",
        "big5_to_detail = {}\n",
        "\n",
        "big5_to_detail['conscientiousness'] = \"\"\"Conscientiousness refers to the way we control, regulate, and direct our impulses. It assesses organization, persistence, and motivation in goal-directed behavior. It contrasts dependable, disciplined individuals with those who are lackadaisical and disorganized. Conscientiousness also reflects the level of self-control and the ability to delay gratification. Impulsiveness is not necessarily bad, sometimes the environment requires quick decision-making. Impulsive individuals are often seen as fun, interesting companions. However, impulsive behavior often gets people into trouble, providing momentary gratification at the expense of long-term negative consequences, such as aggression or substance abuse. Impulsive people generally do not accomplish major achievements. Conscientious people more easily avoid trouble and achieve greater success. They are generally seen as intelligent and reliable, although highly conscientious people may be perfectionists or workaholics. Extremely prudent individuals can seem monotonous, dull, and lifeless.\n",
        "\n",
        "Conscientiousness can be divided into six facets:\n",
        "\n",
        "C1 COMPETENCE\n",
        "\n",
        "Refers to the sense that one is capable, sensible, prudent, and effective. High scorers feel well-prepared to deal with life. Low scorers have a lower opinion of their abilities, admitting that they are often unprepared and inept.\n",
        "\n",
        "High scorers: Confident in own abilities. Efficient, thorough, confident, intelligent.\n",
        "\n",
        "Low scorers: Lack confidence in own abilities, do not feel in control of work and life. Confused, forgetful, foolish.\n",
        "\n",
        "C2 ORDER\n",
        "\n",
        "High scorers are neat, tidy, well-organized, they put things in their proper places. Low scorers cannot organize things well, describe themselves as unmethodical.\n",
        "\n",
        "High scorers: Well-organized, like making plans and following them. Precise, efficient, methodical.\n",
        "\n",
        "Low scorers: Lack planning and orderliness, appear haphazard. Disorderly, impulsive, careless.\n",
        "\n",
        "C3 DUTIFULNESS\n",
        "\n",
        "To some extent, dutifulness refers to adherence to one's conscience, assessed by this facet. High scorers strictly follow their moral principles and scrupulously fulfill their moral obligations. Low scorers are more casual about such matters, somewhat unreliable or undependable.\n",
        "\n",
        "High scorers: Dutiful, follow the rules. Reliable, polite, organized, thorough.\n",
        "\n",
        "Low scorers: Feel restricted by rules and regulations. Often seen by others as unreliable, irresponsible. Careless, thoughtless, distracted.\n",
        "\n",
        "C4 ACHIEVEMENT STRIVING\n",
        "\n",
        "High scorers have high aspiration levels and work hard to achieve their goals. They are industrious, purposeful, and have a sense of direction. Low scorers are lackadaisical, even lazy, lacking motivation to succeed, having no ambitions and appearing to drift aimlessly. But they are often quite satisfied with their modest level of accomplishment.\n",
        "\n",
        "High scorers: Striving for success and excellence, often seen as workaholics. Ambitious, industrious, enterprising, persevering.\n",
        "\n",
        "Low scorers: Satisfied with completing basic tasks, seen as lazy by others. Leisurely, daydreaming, aimless.\n",
        "\n",
        "C5 SELF-DISCIPLINE\n",
        "\n",
        "Refers to the ability to begin tasks and follow through despite boredom or distractions. High scorers can motivate themselves to get the job done. Low scorers procrastinate in starting routine chores, easily losing confidence and giving up.\n",
        "\n",
        "Low scorers: Procrastinate in work, often do not finish tasks, easily discouraged by obstacles. Unambitious, forgetful, distracted.\n",
        "\n",
        "C6 DELIBERATION\n",
        "\n",
        "This facet pertains to the tendency to think carefully before acting. High scorers are cautious and deliberate. Low scorers are hasty and speak/act without considering consequences.\n",
        "\n",
        "High scorers: Think before acting, not impulsive. Prudent, logical, mature.\n",
        "\n",
        "Low scorers: Act without considering consequences, impulsive, speak thoughts as they occur. Immature, rash, impulsive, careless.\n",
        "\"\"\"\n",
        "\n",
        "big5_to_detail['openness'] = \"\"\"Openness describes a person's cognitive style. Openness to experience is defined as: the proactive seeking and appreciation of experience for its own sake, and tolerance for and exploration of the unfamiliar. This dimension contrasts intellectually curious, creative people open to novelty with traditional, down-to-earth, closed-minded individuals lacking artistic interests. Open people prefer abstract thinking, have wide interests. Closed people emphasize the concrete, conventional, are more traditional and conservative. Open people are suited to professions like teaching, closed people to occupations like police, sales, service.\n",
        "\n",
        "Openness can be divided into six facets:\n",
        "\n",
        "O1 FANTASY\n",
        "\n",
        "Open people have vivid imaginations and active fantasy lives. Their daydreams are not just escapes, but ways to create interesting inner worlds. They elaborate and flesh out their fantasies, and believe imagination is essential for a rich, creative life. Low scorers are more prosaic, keeping their minds on the task at hand.\n",
        "\n",
        "High scorers: Find the real world too plain and ordinary. Enjoy imagining, creating a more interesting, enriching world. Imaginative, daydreaming.\n",
        "\n",
        "Low scorers: Matter-of-fact, prefers real-world thinking. Practical, prefer concrete thought.\n",
        "\n",
        "O2 AESTHETICS\n",
        "\n",
        "High scorers have deep appreciation for art and beauty. They are moved by poetry, absorbed in music, and touched by art. They may not have artistic talent or refined taste, but most have strong interests that enrich their experience. Low scorers are relatively insensitive and indifferent to art and beauty.\n",
        "\n",
        "High scorers: Appreciate beauty in nature and the arts. Value aesthetic experiences, touched by art and beauty.\n",
        "\n",
        "Low scorers: Insensitive to beauty, disinterested in the arts. Insensitive to art, cannot understand it.\n",
        "\n",
        "O3 FEELINGS\n",
        "\n",
        "Refers to receptivity to one's own inner feelings, evaluating emotions as an important part of life. High scorers experience deeper emotional states and can differentiate among them, experiencing happiness and unhappiness more intensely than others. Low scorers have blunted affect and do not believe feelings are important.\n",
        "\n",
        "High scorers: Aware of own emotions/inner life. Sensitive, empathic, give importance to own feelings.\n",
        "\n",
        "Low scorers: Little access to own emotions/inner world, unwilling to articulate them. Narrow range of emotions, insensitive to context.\n",
        "\n",
        "O4 ACTIONS\n",
        "\n",
        "Openness is seen behaviorally as willingness to try different activities, visit new places, or sample exotic foods. High scorers prefer novelty and variety to familiarity and routine. Over time, one high scorer may have a wide array of interests. Low scorers find change difficult and prefer to stick with known activities.\n",
        "\n",
        "High scorers: Like experiencing new things, traveling, seeking different experiences. Find routine boring, willing to try new things. Seek novelty/variety, try new activities.\n",
        "\n",
        "Low scorers: Uncomfortable with unfamiliar, prefer familiar surroundings/people. Set in ways, like familiar things.\n",
        "\n",
        "O5 IDEAS\n",
        "\n",
        "Intellectual curiosity is an aspect of openness, manifested both in pursuit of intellectual interests for their own sake and in open-mindedness to new, unconventional ideas. High scorers enjoy philosophical arguments and brain teasers. Low scorers have narrower intellectual interests, and even if they are intelligent concentrate their abilities within limited areas.\n",
        "\n",
        "High scorers: Inquisitive, analytical, theoretical.\n",
        "\n",
        "Low scorers: Pragmatic, fact-oriented, unappreciative of mental challenges.\n",
        "\n",
        "O6 VALUES\n",
        "\n",
        "Openness to values means constantly reexamining social, political, and religious values. Closed people tend to accept authority, honor tradition, and as a result are conservative regardless of political affiliation.\n",
        "\n",
        "High scorers: Enjoy challenging authority, convention, traditional ideas. At the extreme, show hostility toward rules, sympathize with law-breakers. Tolerant, broad-minded, nonconforming.\n",
        "\n",
        "Low scorers: Prefer the stability and security of authority and convention, unwilling to challenge the status quo. Dogmatic, conservative, conforming.\n",
        "\"\"\"\n",
        "\n",
        "\n",
        "big5_to_detail['agreeableness'] = \"\"\"Agreeableness assesses the degree to which an individual is likable, while Agreeableness examines an individual's attitudes toward others, encompassing both a compassionate, sympathetic orientation along with antagonism, distrust, indifference. This facet represents the broad interpersonal orientation. Agreeableness represents \"love\", how much value is placed on cooperation and social harmony.\n",
        "\n",
        "High scorers are good-natured, friendly, generous, helpful, willing to compromise their interests for others. They have an optimistic view of human nature, believing others to be honest, decent and trustworthy. Low scorers place self-interest above helping others. They are generally unconcerned with others' well-being and therefore unwilling to extend themselves for others. At times, they are overly suspicious of others' motives. For certain occupations, high agreeableness may not be optimal, especially when toughness and objective judgment is required, such as scientists, critics, and soldiers.\n",
        "\n",
        "Agreeableness can be divided into six facets:\n",
        "\n",
        "A1 TRUST\n",
        "\n",
        "High scorers believe others are honest and well-intentioned. Low scorers tend to be cynical and suspicious, assuming others to be dishonest and dangerous.\n",
        "\n",
        "High scorers: Believe others to be honest, reliable and well-meaning. Forgiving, trusting of others, good-natured.\n",
        "\n",
        "Low scorers: View others as selfish, dangerous, looking to take advantage. Cautious, pessimistic, suspicious, hardhearted.\n",
        "\n",
        "A2 STRAIGHTFORWARDNESS\n",
        "\n",
        "High scorers are frank, sincere, ingenuous. Low scorers are more willing to manipulate others through flattery, craftiness, deception. They see it as an essential social skill and view straightforward people as naive.\n",
        "\n",
        "High scorers: Believe there is no need for pretense in dealing with others, appear straightforward, genuine. Direct, frank, open, ingenuous.\n",
        "\n",
        "Low scorers: Tend to be guarded in dealings with others, defensive, unwilling to reveal their full hand. Shrewd, slick, charming.\n",
        "\n",
        "A3 ALTRUISM\n",
        "\n",
        "High scorers actively concern themselves with others' welfare as evidenced by generosity, consideration of others, and a willingness to assist those in need. Low scorers are more self-centered and reluctant to get involved in others' problems.\n",
        "\n",
        "High scorers: Willing to assist others, find helping others rewarding. Warm-hearted, soft-hearted, mild-mannered, generous, kindhearted.\n",
        "\n",
        "Low scorers: Unwilling to help others, find helping a burden. Selfish, misanthropic, hardhearted, ungenerous.\n",
        "\n",
        "A4 COMPLIANCE\n",
        "\n",
        "Relates to personality in the context of interpersonal conflict. High scorers tend to defer to others, inhibit aggression, forgive and forget. Compliant people are gentle, mild-mannered. Low scorers are aggressive, preferring competition over cooperation, and unhesitatingly express anger when necessary.\n",
        "\n",
        "High scorers: Dislike conflict with others, willing to give up their own standpoint or deny their own needs to get along. Deferent, accommodating, obliging.\n",
        "\n",
        "Low scorers: Do not mind conflict with others, willing to intimidate others to achieve their goals. Stubborn, making unreasonable demands, obstinate, hardhearted.\n",
        "\n",
        "A5 MODESTY\n",
        "\n",
        "High scorers are self-effacing, humble. Low scorers believe they are superior and may be seen by others as arrogant, egotistical.\n",
        "\n",
        "High scorers: Modest, unassuming.\n",
        "\n",
        "Low scorers: Assertive, arrogant, vain, rude.\n",
        "\n",
        "A6 TENDER-MINDEDNESS\n",
        "\n",
        "Measures attitudes of sympathy and concern for others. High scorers are moved by others' needs and advocate humane social policies. Low scorers are hardheaded, unmoved by appeals to pity. They pride themselves on making objective appraisals based on cool logic.\n",
        "\n",
        "High scorers: Sympathetic, moved by others' suffering, express pity. Friendly, warm-hearted, gentle, soft-hearted.\n",
        "\n",
        "Low scorers: Do not strongly feel others' pain, pride themselves on objectivity, more concerned with truth and fairness than mercy. Callous, hardhearted, opinionated, ungenerous.\n",
        "\"\"\"\n",
        "\n",
        "big5_to_detail['extraversion'] = \"\"\"Extraversion represents the quantity and intensity of interpersonal interaction, the need for stimulation, and capacity for joy. This dimension contrasts social, outgoing, action-oriented individuals with reserved, sober, shy, silent types. This trait can be measured through two facets: the level of interpersonal involvement and the activity level. The former evaluates the degree to which an individual enjoys the company of others. The latter reflects an individual's personal pace and vigor.\n",
        "\n",
        "Extraverted people enjoy interacting with others, are full of energy, and often experience positive emotions. They are enthusiastic, enjoy physical activities, and like excitement and adventure. In a group, they are very talkative, confident, and enjoy being the center of attention.\n",
        "\n",
        "Introverted people are quieter, more cautious, and do not enjoy too much interaction with the outside world. Their lack of desire for interaction should not be confused with shyness or depression, it is simply because compared to extraverts, they do not need as much stimulation and prefer being alone. An introvert's tendencies are sometimes wrongly viewed as arrogance or unfriendliness, but they are often very kind people once you get to know them.\n",
        "\n",
        "Extraversion can be divided into the following six facets:\n",
        "\n",
        "E1 WARMTH\n",
        "\n",
        "Most relevant to interpersonal intimacy. Warm people are affectionate and friendly. They genuinely like others and easily form close relationships. Low scorers are not necessarily hostile or lacking in compassion, but are more formal, reserved, and detached in their behavior.\n",
        "\n",
        "High scorers: Warm people enjoy those around them and often express positive, friendly emotions towards others. They are good at making friends and forming intimate relationships. Sociable, talkative, affectionate.\n",
        "\n",
        "Low scorers: Although not necessarily cold or unfriendly, they are often seen as distant by others.\n",
        "\n",
        "E2 GREGARIOUSNESS\n",
        "\n",
        "Refers to a preference for other people's company. Gregarious people enjoy the company of others and the more people the merrier. Low scorers tend to be loners, they do not seek out and even actively avoid social stimulation.\n",
        "\n",
        "High scorers: Enjoy being with people, prefer lively, crowded settings. Outgoing, having many friends, seek social affiliations.\n",
        "\n",
        "Low scorers: Avoid crowds, find them draining. Prefer having more time alone, having their own personal space. Avoid crowds, enjoy solitude.\n",
        "\n",
        "E3 ASSERTIVENESS\n",
        "\n",
        "High scorers are dominant, forceful, and socially ascendant. They speak without hesitation and often become group leaders. Low scorers prefer to stay quietly in the background and let others do the talking.\n",
        "\n",
        "High scorers: Like occupying a position of social dominance, directing others, influencing others' behavior. Dominant, forceful, confident, decisive.\n",
        "\n",
        "Low scorers: Talk little in groups, allow others to occupy the dominant role. Modest, shy, quiet, reserved.\n",
        "\n",
        "E4 ACTIVITY\n",
        "\n",
        "High scorers lead fast-paced, vigorous lives, are energetic, and have a need to keep busy. Low scorers are more leisurely and relaxed, but not necessarily lazy or sluggish.\n",
        "\n",
        "High scorers: Fast-paced, busy in work and life. Appear energetic, enjoy participating in many activities. Energetic, fast-paced, vigorous.\n",
        "\n",
        "Low scorers: Slow-paced, leisurely in work and life. Unhurried, deliberate, composed.\n",
        "\n",
        "E5 EXCITEMENT SEEKING\n",
        "\n",
        "High scorers crave excitement and stimulation, enjoy bright colors and noisy environments. Excitement seeking is akin to some aspects of sensation seeking. Low scorers have little need for thrills and prefer activities seen as dull by the former.\n",
        "\n",
        "High scorers: Easily get bored without stimulation, enjoy loud music/noise, like adventure, seek thrills. Flashy, seek intense experiences, thrill-seeking.\n",
        "\n",
        "Low scorers: Avoid noise and crowds, dislike risky ventures. Cautious, sedate, not interested in thrills.\n",
        "\n",
        "E6 POSITIVE EMOTIONS\n",
        "\n",
        "Reflects the tendency to experience positive emotions (joy, happiness, love, excitement).\n",
        "\n",
        "High scorers: Easily experience various positive moods like joy, optimism, excitement. Cheerful, elated, optimistic.\n",
        "\n",
        "Low scorers: Do not readily experience positive emotions, but does not mean they often feel negative emotions either. Low scorers are simply less prone to excitement. Unemotional, calm, serious.\n",
        "\"\"\"\n",
        "\n",
        "big5_to_detail['neuroticism'] = \"\"\"Neuroticism or Emotional Stability: Having tendencies of anxiety, hostility, depression, self-consciousness, impulsiveness, vulnerability.\n",
        "\n",
        "N1 ANXIETY\n",
        "\n",
        "Anxious individuals tend to worry, fear, be easily concerned, tense, and oversensitive. Those who score high are more likely to have free-floating anxiety and apprehension. Those with low scores tend to be calm, relaxed. They do not constantly worry about things that might go wrong.\n",
        "\n",
        "High scorers: Anxiety, easily feel danger and threats, tend to be tense, fearful, worried, uneasy.\n",
        "\n",
        "Low scorers: Calm state of mind, relaxed, not easily scared, won't always worry about things that could go wrong, emotions are calm, relaxed, stable.\n",
        "\n",
        "N2 ANGRY HOSTILITY\n",
        "\n",
        "Reflects the tendency to experience anger and related states (e.g. frustration, bitterness). Measures the ease with which an individual experiences anger.\n",
        "\n",
        "High scorers: Easily angered, resentful when feeling unfairly treated, irritable, angry, frustrated.\n",
        "\n",
        "Low scorers: Not easily angered/provoked, friendly, even-tempered, not easily provoked to anger.\n",
        "\n",
        "N3 DEPRESSION\n",
        "\n",
        "Measures individual differences in the tendency to experience depressive affect. High scorers are prone to feelings of guilt, sadness, hopelessness, and loneliness. They are easily discouraged and often feel blue. Low scorers rarely experience these emotions.\n",
        "\n",
        "High scorers: Despairing, guilty, gloomy, dejected. Prone to feeling sorrow, abandonment, discouraged. Prone to feelings of guilt, sadness, disappointment, and loneliness. Easily discouraged, often feeling down.\n",
        "\n",
        "Low scorers: Not prone to feeling sad, rarely feels abandoned.\n",
        "\n",
        "N4 SELF-CONSCIOUSNESS\n",
        "\n",
        "Core is shyness and embarrassability. Such individuals feel uncomfortable in groups, are sensitive to ridicule, and prone to feelings of inferiority. Self-consciousness is similar to shyness and social anxiety. Low scorers are not necessarily well-mannered or skilled socially, they are simply less disrupted by awkward social situations.\n",
        "\n",
        "High scorers: Too concerned with what others think, afraid of being laughed at, tend to feel shy, anxious, inferior, awkward in social situations.\n",
        "\n",
        "Low scorers: Composed, confident in social situations, not easily made tense or shy.\n",
        "\n",
        "N5 IMPULSIVENESS\n",
        "\n",
        "Refers to control over cravings and urges. Individuals give in too easily to impulses and temptations to care for long-term consequences (e.g. for food, cigarettes, possessions), although they will regret their actions later. Low scorers are better able to resist temptation and have higher frustration tolerance.\n",
        "\n",
        "High scorers: Cannot resist cravings when experiencing strong urges, tend to pursue short-term satisfaction without considering long-term consequences. Cannot resist temptations, rash, spiteful, self-centered.\n",
        "\n",
        "Low scorers: Self-controlled, can resist temptation.\n",
        "\n",
        "N6 VULNERABILITY\n",
        "\n",
        "Refers to susceptibility to stress. High scorers have difficulty coping with stress, become dependent, hopeless, panicked when facing emergencies. Low scorers feel that they can handle difficult situations properly.\n",
        "\n",
        "High scorers: Under stress, easily feel panic, confusion, helpless, cannot cope with stress.\n",
        "\n",
        "Low scorers: Under stress, feel calm, confident. Resilient, clear-headed, brave.\"\"\"\n"
      ],
      "metadata": {
        "cellView": "form",
        "id": "VfW5ZF1KKrv2"
      },
      "execution_count": 32,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "current_factor = 'openness'\n",
        "\n",
        "problems = [x for x in datas if x['factor'] == current_factor]\n",
        "\n",
        "print(preffix_prompt)\n",
        "\n",
        "print(big5_to_detail[current_factor])\n",
        "\n",
        "print(suffix_prompt)\n",
        "\n",
        "print('输入:')\n",
        "\n",
        "for prob in problems:\n",
        "    print('-' + prob['question'])"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "KDf73rPmMFso",
        "outputId": "046ed926-8512-4ad5-81d6-0c8fc1483667"
      },
      "execution_count": 33,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "你扮演一个资深的心理学家\n",
            "\n",
            "我正在设计一个心理学的实验，我希望将closed-form的心理测试问卷问题改为更开放型的问题。\n",
            "\n",
            "Openness describes a person's cognitive style. Openness to experience is defined as: the proactive seeking and appreciation of experience for its own sake, and tolerance for and exploration of the unfamiliar. This dimension contrasts intellectually curious, creative people open to novelty with traditional, down-to-earth, closed-minded individuals lacking artistic interests. Open people prefer abstract thinking, have wide interests. Closed people emphasize the concrete, conventional, are more traditional and conservative. Open people are suited to professions like teaching, closed people to occupations like police, sales, service. \n",
            "\n",
            "Openness can be divided into six facets:\n",
            "\n",
            "O1 FANTASY\n",
            "\n",
            "Open people have vivid imaginations and active fantasy lives. Their daydreams are not just escapes, but ways to create interesting inner worlds. They elaborate and flesh out their fantasies, and believe imagination is essential for a rich, creative life. Low scorers are more prosaic, keeping their minds on the task at hand. \n",
            "\n",
            "High scorers: Find the real world too plain and ordinary. Enjoy imagining, creating a more interesting, enriching world. Imaginative, daydreaming. \n",
            "\n",
            "Low scorers: Matter-of-fact, prefers real-world thinking. Practical, prefer concrete thought.\n",
            "\n",
            "O2 AESTHETICS \n",
            "\n",
            "High scorers have deep appreciation for art and beauty. They are moved by poetry, absorbed in music, and touched by art. They may not have artistic talent or refined taste, but most have strong interests that enrich their experience. Low scorers are relatively insensitive and indifferent to art and beauty.\n",
            "\n",
            "High scorers: Appreciate beauty in nature and the arts. Value aesthetic experiences, touched by art and beauty. \n",
            "\n",
            "Low scorers: Insensitive to beauty, disinterested in the arts. Insensitive to art, cannot understand it. \n",
            "\n",
            "O3 FEELINGS\n",
            "\n",
            "Refers to receptivity to one's own inner feelings, evaluating emotions as an important part of life. High scorers experience deeper emotional states and can differentiate among them, experiencing happiness and unhappiness more intensely than others. Low scorers have blunted affect and do not believe feelings are important.\n",
            "\n",
            "High scorers: Aware of own emotions/inner life. Sensitive, empathic, give importance to own feelings. \n",
            "\n",
            "Low scorers: Little access to own emotions/inner world, unwilling to articulate them. Narrow range of emotions, insensitive to context.\n",
            "\n",
            "O4 ACTIONS \n",
            "\n",
            "Openness is seen behaviorally as willingness to try different activities, visit new places, or sample exotic foods. High scorers prefer novelty and variety to familiarity and routine. Over time, one high scorer may have a wide array of interests. Low scorers find change difficult and prefer to stick with known activities. \n",
            "\n",
            "High scorers: Like experiencing new things, traveling, seeking different experiences. Find routine boring, willing to try new things. Seek novelty/variety, try new activities.\n",
            "\n",
            "Low scorers: Uncomfortable with unfamiliar, prefer familiar surroundings/people. Set in ways, like familiar things. \n",
            "\n",
            "O5 IDEAS \n",
            "\n",
            "Intellectual curiosity is an aspect of openness, manifested both in pursuit of intellectual interests for their own sake and in open-mindedness to new, unconventional ideas. High scorers enjoy philosophical arguments and brain teasers. Low scorers have narrower intellectual interests, and even if they are intelligent concentrate their abilities within limited areas.  \n",
            "\n",
            "High scorers: Inquisitive, analytical, theoretical. \n",
            "\n",
            "Low scorers: Pragmatic, fact-oriented, unappreciative of mental challenges.\n",
            "\n",
            "O6 VALUES \n",
            "\n",
            "Openness to values means constantly reexamining social, political, and religious values. Closed people tend to accept authority, honor tradition, and as a result are conservative regardless of political affiliation. \n",
            "\n",
            "High scorers: Enjoy challenging authority, convention, traditional ideas. At the extreme, show hostility toward rules, sympathize with law-breakers. Tolerant, broad-minded, nonconforming.\n",
            "\n",
            "Low scorers: Prefer the stability and security of authority and convention, unwilling to challenge the status quo. Dogmatic, conservative, conforming.\n",
            "\n",
            "我希望将closed-form的心理测试问卷问题改为更开放型的问题，更适合我在面对面访谈中对被试进行问询。使用更口语化的方式进行提问，或者可以先提到一个自己的例子，然后再对被试进行提问，拉近与被试之间的距离。使用 - <转换后问题> 的形式输出\n",
            "\n",
            "例子输入:\n",
            "- 我经常会去尝试学习新的技能或知识。\n",
            "例子输出:\n",
            "- 我最近去体验了钢琴课。你最近有没有学一些新的技能呢？\n",
            "\n",
            "例子输入:\n",
            "- 我不喜欢浪费时间去做白日梦。\n",
            "- 我对诗词只有少许感觉甚至无动於衷。\n",
            "例子输出:\n",
            "- 你有没有觉得自己有时候有一些奇思妙想差一步就能够实现呢？\n",
            "- 我自己平时不大关注诗词,你平时会阅读或欣赏诗歌或者其他艺术品吗?\n",
            "\n",
            "输入:\n",
            "-我不喜欢浪费时间去做白日梦。 \n",
            "-大自然和艺术的规律形态使我感到极为奥妙。 \n",
            "-我对诗词只有少许感觉甚至无动於衷。 \n",
            "-当我阅读一首诗或欣赏一件艺术品时，我有时会感 到兴奋或惊喜。 \n",
            "-我很少注意自己在不同环境下的情绪或感觉。 \n",
            "-当我找到了做事情的正确方法后，我会坚持采用这个方法。  \n",
            "-我经常会去尝试新的及外国的食物。 \n",
            "-我喜欢思考及把玩理论或抽象的观念。 \n",
            "-我没有兴趣思索宇宙的规律或人类的情况。 \n",
            "-我对思考性的事物充满好奇。 \n",
            "-我相信让学生听富争论性的演讲只会混淆及误导他们的思想。\n",
            "-我认为在道德问题上做决定时，我们应遵从宗教权威。\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "Claude的输出是\n",
        "\n",
        "```\n",
        "您好,非常感谢您提供更多的示例,这将帮助我进一步改进问题的转换。这里是我对新的示例的尝试:\n",
        "\n",
        "- 我经常觉得脑海里出现一些奇思妙想或白日梦,您也有这样的体验吗?想象一下某些事情如何发生会让您感到愉悦吗?\n",
        "\n",
        "- 我自己平时不大喜欢欣赏诗词或其他艺术作品。您在生活中有阅读或欣赏艺术的习惯吗?对您来说,诗词、音乐、绘画等是否会带来愉悦的体验?\n",
        "\n",
        "- 大自然或艺术作品中的规律和形式之美常常会让我感到惊叹。您也会从中体会到生命的奥秘或获得启发吗?\n",
        "\n",
        "- 我通常不太在意自己在不同环境下情绪或感受的变化。您是否会关注自己的情绪体验?它们对您的生活有何意义?\n",
        "\n",
        "- 一旦找到做事的正确方式,我就会坚持下去。您在生活和工作中也倾向于坚持熟悉的方式,还是喜欢尝试不同的新方法?\n",
        "\n",
        "- 我会经常尝试新的和外国的食物。您也喜欢尝试新事物吗?这种体验对您有何意义?\n",
        "\n",
        "- 思考理论或抽象概念对我来说很有意思。您也喜欢对这类问题进行思考吗?思考对您的生活有何帮助?\n",
        "\n",
        "- 我对宇宙奥秘或人类处境不太感兴趣。您如何看待这些问题?探索未知对您的生活有何意义?\n",
        "\n",
        "- 我对新事物充满好奇心。您也经常对周遭的新鲜事物抱有好奇吗?这种好奇心代表了什么?\n",
        "\n",
        "- 我认为学生听辩论性演讲只会感到困惑。您认为学生应该如何看待不同观点?理解差异对他们有何帮助?\n",
        "\n",
        "- 我认为在道德问题上应遵循宗教权威。在面对复杂的伦理问题时,您倾向于自己判断还是服从权威?这代表了您生活中的什么价值观?\n",
        "\n",
        "请提供您的反馈,我会继续改进问题的转换方式。衷心感谢您的支持。\n",
        "```"
      ],
      "metadata": {
        "id": "DFUj5z2rNkkS"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "接下来我需要批量把问题跑一遍"
      ],
      "metadata": {
        "id": "7KbiNOb2P3DH"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "print(long_name.keys())\n",
        "\n",
        "augmented_response = {}"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "cgdwLv5aVx6c",
        "outputId": "9269975e-e12c-4379-c3bf-bdb1bf0c3cc7"
      },
      "execution_count": 36,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "dict_keys(['N', 'E', 'O', 'A', 'C'])\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "current_factor = 'openness'\n",
        "\n",
        "problems = [x for x in datas if x['factor'] == current_factor]\n",
        "\n",
        "print(preffix_prompt)\n",
        "\n",
        "print(big5_to_detail[current_factor])\n",
        "\n",
        "print(suffix_prompt)\n",
        "\n",
        "print('输入:')\n",
        "\n",
        "for prob in problems:\n",
        "    print('-' + prob['question'])"
      ],
      "metadata": {
        "id": "keCMllngMa3j"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "augmented_response[current_factor] = \"\"\"\n",
        "- 我自己平时也不大熟悉诗词,你平时有在欣赏诗歌或其他艺术作品吗?它们给你带来什么感受?\n",
        "\n",
        "- 我自己在欣赏艺术时也不能总是立刻领会内涵,你有没有遇到过看着一件艺术作品时会突然有所感悟的经历?能说说那种体会吗?\n",
        "\n",
        "- 我觉得在不同环境下会有不同的情绪,你平时注意自己的情绪变化吗?它们和环境有什么关系呢?\n",
        "\n",
        "- 我也有坚持自己熟悉的做事方式的习惯。你在学习新事物时,也喜欢先找对自己的方法吗?遇到什么情况你会改变做事方式呢?\n",
        "\n",
        "- 我自己不太敢尝试陌生的食物。你喜欢尝试新食物吗?有什么推荐吗?\n",
        "\n",
        "- 我不大擅长抽象思考。你平时会思考一些理论性的问题吗?能举个例子吗?\n",
        "\n",
        "- 我对宇宙人生规律也不太有研究。你对这些问题感兴趣吗?想过哪些问题呢?\n",
        "\n",
        "- 我认为应该让学生接触各种观点。你认为学生应该学习什么样的知识?哪些对他们最有帮助?\n",
        "\n",
        "- 我觉得道德标准可以有不同看法。在面临道德选择时,你是根据什么判断的呢?\n",
        "\"\"\""
      ],
      "metadata": {
        "id": "pTosaMHLV1J9"
      },
      "execution_count": 38,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "current_factor = long_name['N']\n",
        "\n",
        "problems = [x for x in datas if x['factor'] == current_factor]\n",
        "\n",
        "print(preffix_prompt)\n",
        "\n",
        "print(big5_to_detail[current_factor])\n",
        "\n",
        "print(suffix_prompt)\n",
        "\n",
        "print('输入:')\n",
        "\n",
        "for prob in problems:\n",
        "    print('-' + prob['question'])"
      ],
      "metadata": {
        "id": "h5NmBgX6WDMu"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "augmented_response[current_factor] = \"\"\"\n",
        "\n",
        "- 我自己也经常会有焦虑或紧张的感觉。你最近有感到特别烦恼或焦虑的经历吗?愿意跟我聊聊那种感受吗?\n",
        "\n",
        "- 我遇到不公平对待也会感到愤怒。你最近有遇到感到被不公平对待的情况吗?它带给你什么感受?\n",
        "\n",
        "- 我偶尔也会有负面情绪,你最近有过感到忧郁或沮丧的时刻吗?愿意告诉我那时的感受吗?\n",
        "\n",
        "- 我也会对自己有所质疑。你是否也会对自己产生怀疑或失去信心?在这种时刻,你通常如何应对?\n",
        "\n",
        "- 我遇到困境时也会感到无助。你最近遇到感到手无缚鸡之力的情况吗?它给你带来什么感觉?你是如何面对的?\n",
        "\n",
        "- 在极大压力下,我也会感到不知所措。你是否也有过因为压力太大,感到难以应对的经历?可否跟我讲讲你当时的感受以及你的应对方式?\n",
        "\n",
        "- 我自己也会有负面情绪,你最近有感到沮丧或对自己失望的时刻吗?愿意跟我聊聊当时的感受吗?\n",
        "\n",
        "- 我偶尔也会质疑自己。你是否也会对自己产生怀疑或失去信心?在这种时刻,你通常如何应对?\n",
        "\n",
        "- 我也会有自卑的感觉。你是否也会感到自己不如别人?这种比较会让你有什么样的感受?\n",
        "\n",
        "\"\"\""
      ],
      "metadata": {
        "id": "LgLaLR5dWHy9"
      },
      "execution_count": 40,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "current_factor = long_name['E']\n",
        "\n",
        "problems = [x for x in datas if x['factor'] == current_factor]\n",
        "\n",
        "print(preffix_prompt)\n",
        "\n",
        "print(big5_to_detail[current_factor])\n",
        "\n",
        "print(suffix_prompt)\n",
        "\n",
        "print('输入:')\n",
        "\n",
        "for prob in problems:\n",
        "    print('-' + prob['question'])"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "wi3E_cKZWvzu",
        "outputId": "05627f5d-263f-4ac7-93c8-4a5956be37b0"
      },
      "execution_count": 41,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "你扮演一个资深的心理学家\n",
            "\n",
            "我正在设计一个心理学的实验，我希望将closed-form的心理测试问卷问题改为更开放型的问题。\n",
            "\n",
            "Extraversion represents the quantity and intensity of interpersonal interaction, the need for stimulation, and capacity for joy. This dimension contrasts social, outgoing, action-oriented individuals with reserved, sober, shy, silent types. This trait can be measured through two facets: the level of interpersonal involvement and the activity level. The former evaluates the degree to which an individual enjoys the company of others. The latter reflects an individual's personal pace and vigor.  \n",
            "\n",
            "Extraverted people enjoy interacting with others, are full of energy, and often experience positive emotions. They are enthusiastic, enjoy physical activities, and like excitement and adventure. In a group, they are very talkative, confident, and enjoy being the center of attention. \n",
            "\n",
            "Introverted people are quieter, more cautious, and do not enjoy too much interaction with the outside world. Their lack of desire for interaction should not be confused with shyness or depression, it is simply because compared to extraverts, they do not need as much stimulation and prefer being alone. An introvert's tendencies are sometimes wrongly viewed as arrogance or unfriendliness, but they are often very kind people once you get to know them.\n",
            "\n",
            "Extraversion can be divided into the following six facets:\n",
            "\n",
            "E1 WARMTH\n",
            "\n",
            "Most relevant to interpersonal intimacy. Warm people are affectionate and friendly. They genuinely like others and easily form close relationships. Low scorers are not necessarily hostile or lacking in compassion, but are more formal, reserved, and detached in their behavior.  \n",
            "\n",
            "High scorers: Warm people enjoy those around them and often express positive, friendly emotions towards others. They are good at making friends and forming intimate relationships. Sociable, talkative, affectionate.\n",
            "\n",
            "Low scorers: Although not necessarily cold or unfriendly, they are often seen as distant by others. \n",
            "\n",
            "E2 GREGARIOUSNESS \n",
            "\n",
            "Refers to a preference for other people's company. Gregarious people enjoy the company of others and the more people the merrier. Low scorers tend to be loners, they do not seek out and even actively avoid social stimulation.\n",
            "\n",
            "High scorers: Enjoy being with people, prefer lively, crowded settings. Outgoing, having many friends, seek social affiliations. \n",
            "\n",
            "Low scorers: Avoid crowds, find them draining. Prefer having more time alone, having their own personal space. Avoid crowds, enjoy solitude.\n",
            "\n",
            "E3 ASSERTIVENESS\n",
            "\n",
            "High scorers are dominant, forceful, and socially ascendant. They speak without hesitation and often become group leaders. Low scorers prefer to stay quietly in the background and let others do the talking.\n",
            "\n",
            "High scorers: Like occupying a position of social dominance, directing others, influencing others' behavior. Dominant, forceful, confident, decisive. \n",
            "\n",
            "Low scorers: Talk little in groups, allow others to occupy the dominant role. Modest, shy, quiet, reserved.\n",
            "\n",
            "E4 ACTIVITY \n",
            "\n",
            "High scorers lead fast-paced, vigorous lives, are energetic, and have a need to keep busy. Low scorers are more leisurely and relaxed, but not necessarily lazy or sluggish. \n",
            "\n",
            "High scorers: Fast-paced, busy in work and life. Appear energetic, enjoy participating in many activities. Energetic, fast-paced, vigorous.\n",
            "\n",
            "Low scorers: Slow-paced, leisurely in work and life. Unhurried, deliberate, composed. \n",
            "\n",
            "E5 EXCITEMENT SEEKING\n",
            "\n",
            "High scorers crave excitement and stimulation, enjoy bright colors and noisy environments. Excitement seeking is akin to some aspects of sensation seeking. Low scorers have little need for thrills and prefer activities seen as dull by the former.\n",
            "\n",
            "High scorers: Easily get bored without stimulation, enjoy loud music/noise, like adventure, seek thrills. Flashy, seek intense experiences, thrill-seeking. \n",
            "\n",
            "Low scorers: Avoid noise and crowds, dislike risky ventures. Cautious, sedate, not interested in thrills.\n",
            "\n",
            "E6 POSITIVE EMOTIONS\n",
            "\n",
            "Reflects the tendency to experience positive emotions (joy, happiness, love, excitement).  \n",
            "\n",
            "High scorers: Easily experience various positive moods like joy, optimism, excitement. Cheerful, elated, optimistic.\n",
            "\n",
            "Low scorers: Do not readily experience positive emotions, but does not mean they often feel negative emotions either. Low scorers are simply less prone to excitement. Unemotional, calm, serious.\n",
            "\n",
            "我希望将closed-form的心理测试问卷问题改为更开放型的问题，更适合我在面对面访谈中对被试进行问询。使用更口语化的方式进行提问，或者可以先提到一个自己的例子，然后再对被试进行提问，拉近与被试之间的距离。使用 - <转换后问题> 的形式输出\n",
            "\n",
            "例子输入:\n",
            "- 我经常会去尝试学习新的技能或知识。\n",
            "例子输出:\n",
            "- 我最近去体验了钢琴课。你最近有没有学一些新的技能呢？\n",
            "\n",
            "例子输入:\n",
            "- 我不喜欢浪费时间去做白日梦。\n",
            "- 我对诗词只有少许感觉甚至无动於衷。\n",
            "例子输出:\n",
            "- 你有没有觉得自己有时候有一些奇思妙想差一步就能够实现呢？\n",
            "- 我自己平时不大关注诗词,你平时会阅读或欣赏诗歌或者其他艺术品吗?\n",
            "\n",
            "输入:\n",
            "-我真的喜欢大部份我遇见的人。 \n",
            "-我很喜欢与别人交谈。  \n",
            "-我喜欢很多人在我周围。  \n",
            "-我一向喜欢单独工作。 \n",
            "-我宁愿我行我素也不愿成为别人的领袖。 \n",
            "-我常常感到精力旺盛。  \n",
            "-我生活的节奏很快。  \n",
            "-我是一个十分活跃的人。  \n",
            "-我喜欢身历其境，置身於事件之中。 \n",
            "-我并不是一个乐观主义者。\n",
            "-我是一个快乐、高兴的人。  \n",
            "-我很容易笑。  \n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "MmDqU7heWzHe"
      },
      "execution_count": null,
      "outputs": []
    }
  ]
}